Skip to content

✨ Implement Boxcutter #1946

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

thetechnick
Copy link
Contributor

Description

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 30, 2025
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 30, 2025
Copy link

netlify bot commented Apr 30, 2025

Deploy Preview for olmv1 failed.

Name Link
🔨 Latest commit 7ba6e02
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/688d222ca34cc20008d33c06

Comment on lines +195 to +211
hasher.Reset()

printer := spew.ConfigState{
Indent: " ",
SortKeys: true,
DisableMethods: true,
SpewKeys: true,
}
if _, err := printer.Fprintf(hasher, "%#v", objectToWrite); err != nil {
panic(err)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an OLM-ism or a boxcutter-ism? I wonder if json.NewEncoder(hasher).Encode(objectToWrite) would be better?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 7, 2025
@perdasilva perdasilva force-pushed the poc-boxcutter branch 2 times, most recently from 1c23866 to dc66501 Compare July 15, 2025 11:12
@perdasilva perdasilva changed the title POC: Implement Boxcutter ✨ Implement Boxcutter Jul 15, 2025
Copy link

codecov bot commented Jul 15, 2025

Codecov Report

❌ Patch coverage is 46.99538% with 344 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.85%. Comparing base (8cf5bda) to head (d96b88a).
⚠️ Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
api/v1/zz_generated.deepcopy.go 0.00% 114 Missing ⚠️
...controllers/clusterextensionrevision_controller.go 70.44% 59 Missing and 14 partials ⚠️
cmd/operator-controller/main.go 21.34% 63 Missing and 7 partials ⚠️
...perator-controller/rukpak/util/testing/bundlefs.go 0.00% 42 Missing ⚠️
internal/operator-controller/applier/boxcutter.go 73.79% 25 Missing and 13 partials ⚠️
...troller/controllers/clusterextension_controller.go 30.00% 6 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1946      +/-   ##
==========================================
- Coverage   72.61%   69.85%   -2.77%     
==========================================
  Files          78       83       +5     
  Lines        7260     7965     +705     
==========================================
+ Hits         5272     5564     +292     
- Misses       1633     2015     +382     
- Partials      355      386      +31     
Flag Coverage Δ
e2e 40.09% <3.95%> (-3.46%) ⬇️
unit 57.25% <43.60%> (-1.63%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@perdasilva perdasilva force-pushed the poc-boxcutter branch 6 times, most recently from 35cdf3b to 370bac6 Compare July 21, 2025 16:28
@perdasilva perdasilva force-pushed the poc-boxcutter branch 9 times, most recently from 4f39c38 to 842037e Compare July 23, 2025 15:27
@perdasilva perdasilva force-pushed the poc-boxcutter branch 2 times, most recently from b3f1de0 to 6827d71 Compare July 28, 2025 14:47
# DO NOT ADD A NAMESPACE HERE
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This component is not used... it's not being included in the experimental manifests (yet).
See:
https://github.com/operator-framework/operator-controller/blob/main/config/components/base/experimental/kustomization.yaml

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was intentional. Boxcutter runtime is orthogonal to all other feature gates. I think, at least for the time being, it is preferable to e2e tests the other FGs against the standard applier.

BundlePathCSV = BundlePathManifests + "/csv.yaml"
)

func NewBundleFS() fstest.MapFS {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the benefit to moving this out of the bundle/source/source_test.go? I'm not seeing it used anywhere else. It just feels as though it's making the PR bigger without benefit?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's used in the boxcutter applier test [e.g.]

sch := apimachineryruntime.NewScheme()
require.NoError(t, ocv1.AddToScheme(sch))
cl, err := client.New(config, client.Options{Scheme: sch})
cl, err := client.New(config, client.Options{Scheme: newScheme(t)})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, not seeing the benefit of putting this into a function.

Copy link
Contributor

@perdasilva perdasilva Jul 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

used by the controllerextensionrevision_controller test, [e.g.]

go.mod Outdated
Comment on lines 52 to 53
replace pkg.package-operator.run/boxcutter => github.com/perdasilva/boxcutter v0.0.0-20250715101157-18ea858f54bd

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably, temporary, until you get your boxcutter changes merged?

Copy link

openshift-ci bot commented Jul 29, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kevinrizza for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Per Goncalves da Silva and others added 15 commits August 1, 2025 16:56
…time libs

Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
…re component

Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
tmshort added 2 commits August 1, 2025 16:04
Signed-off-by: Todd Short <tshort@redhat.com>
Signed-off-by: Todd Short <tshort@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants